Skip to content

feat(helm): set tool approval on the muster MCPServer - #359

Merged
Rotfuks merged 10 commits into
mainfrom
tool-approval
Nov 30, 2026
Merged

Rotfuks merged 10 commits into
mainfrom
tool-approval

Conversation

@Rotfuks

@Rotfuks Rotfuks commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Milestones 1 to 3 are on this branch. Milestones 2 and 3 added one commit here (b561e13, the values comment, schema description and README link the concept page); agent settings, grants and the 3.x migration live in agent-manager and the agent chart (linked below). The last commit, b980b84, only condenses the docs (shorter values comments, schema descriptions and README rows; no behaviour change).

Part of giantswarm/giantswarm#38902. The review record is the first comment on this PR.

What does this PR do?

muster now decides Allow, Ask or Block for every tool call (giantswarm/muster, linked below). A connector without settings is "not reviewed" and runs unasked. This PR makes Cluster Manager's chart say it explicitly: muster.mcpServer.approval renders spec.approval on the muster MCPServer with rule: Allow and one entry per tool (11 tools, all Allow, the same effect as today). 11 tools, all Allow, rule Allow. The schema carries a per-tool enum: a new tool must be added to the schema and values together.

  • The value is validated by values.schema.json (rule and tools: Allow, Ask, Block; at most 512 tools); a rule of Block hides tools added later until someone sets them.
  • muster.mcpServer.approval: null clears the default and renders no spec.approval. {} does not: Helm merges an empty map into the default (README says so).
  • On a governed platform the agent-platform chart's safe list for this server makes agents asked before every tool that is not a read, whatever these defaults say.

Commits: 317d3eb (the value, template, schema, chart tests), 5edaf2a, 805fe8f, 652a692 (Block rule, README, tests); b561e13 (milestones 2 and 3: the values comment, schema description and README link the tool approval concept page as optional further reading); b980b84 (docs condensed).

What is the effect of this change to users?

None by itself: every tool stays Allow. The settings become visible and editable in the portal's connector Tools tab once muster carries tool approval.

How does it look like?

Not a visual change. Rendered MCPServer:

spec:
  approval:
    rule: Allow
    tools:
      <tool name>: Allow

Changes from the plan

Where this PR differs from the design in the epic (giantswarm/giantswarm#38902):

  • rule: Block. The chart value and schema accept Block as the rule for tools without their own entry, in addition to Allow and Ask.
  • Governed platforms. Where a platform is governed, muster asks agents before every tool of this server that is not on the platform's safe list for it, whatever these defaults say, instead of asking only for an exact list of tool names.
  • Delivery. One pull request per repository carries all three milestones, instead of one pull request per slice.

Any background context you can provide?

  • Epic giantswarm/giantswarm#38902, PRD slice 7 (every chart that ships an MCPServer sets its approval explicitly).
  • Needs muster's CRD with spec.approval. An older CRD prunes the field (the API server warns) and a later muster upgrade does not re-apply it: after the CRD upgrade run flux reconcile helmrelease <name> -n <ns> --force. Until then muster treats the connector as not reviewed (Allow). muster refuses server tool calls while its served CRD lacks the field.
  • Merge after the muster release; the agent-platform PR names the safe list and governance.

Related pull requests (milestones 1 to 3)

Repository PR Role
muster giantswarm/muster#1912 enforcement, approval page, governance, agent settings and grants
backstage giantswarm/backstage#3655 portal: connector and agent tool settings, session prompt, inline approval card
klaus-gateway giantswarm/klaus-gateway#618 Slack prompt and return
agent-platform giantswarm/agent-platform#1495 governance value, safe lists, wiring, agent chart 3.x guard and migrate preflight, the portal's own client and trusted-client wiring
agent-manager giantswarm/agent-manager#483 chart default, per-agent approval settings and grants, migrate 2.x to 3.x
model-manager giantswarm/model-manager#462 chart default
vm-manager giantswarm/vm-manager#264 chart default
workspace-manager giantswarm/workspace-manager#229 chart default
toolchain-manager giantswarm/toolchain-manager#100 chart default
skill-manager giantswarm/skill-manager#48 chart default
agent-platform-mcps giantswarm/agent-platform-mcps#108 chart defaults for the families
agent giantswarm/agent#143 agent chart 3.0: tools and default, requireApproval removed
agent-skills giantswarm/agent-skills#90 agent management skill
agent-platform-operator giantswarm/agent-platform-operator#74 organization chart source follows the configuration
giantswarm-platform-manager giantswarm/giantswarm-platform-manager#1053 governance as a typed input, second-person review
agentlab giantswarm/agentlab#1355 lab: governed mode docs, the portal's Dex client, the portal's workload token

What is needed from the reviewers?

  • Read the review record first.
  • Confirm that Allow all is the intended default for this management server on a trusted platform (the PRD says it is).

Do the docs need to be updated?

Done: README row for muster.mcpServer.approval and the values comment (governed default, Block, null versus {}).

Testing

Check Result
helm lint ok
helm template default, approval=null, rule=Block, rule=Deny, tools.bogus=maybe map rendered; none rendered; Block renders; the others refused by the schema, naming the path
Names in the map versus the server's registered tools identical sets (11 of 11)
Chart unit tests in helm/cluster-manager/tests/ updated; helm unittest not run (plugin not installed on the reviewers' machine), cases reproduced with helm template
Go drift test internal/api/helm_approval_test.go (652a692) compares the chart's approval map with the server's registered tool names. It passed in the agentlab re-test on macOS. CI runs it.

Helm v4.3.2. Not exercised in the first agentlab run (its agent-manager was pinned to 3.4.0 and did not use this chart's defaults). The agentlab re-test (2026-11-25, lab-tests/m1-retest.md) passed with no blocking defects; it ran this repo's drift test (see above). The milestone 2 and 3 lab runs (2026-11-26, lab-tests/m2-integration.md, m3-integration.md) ran the platform with tool approval per agent and the agent chart 3.x move; they did not exercise this chart's defaults.

Render spec.approval on the chart's MCPServer from muster.mcpServer.approval
and write out every tool of this release explicitly, with the "Allow all"
preset (rule Allow, every tool Allow): a platform management server whose
tools the Dev Portal and agents use freely; agent callers are still asked by
muster's floors and the governance mode. Installations tighten per tool.
@circleci-architect

circleci-architect Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Published Helm chart cluster-manager

0.39.10-r27740a5ft20261130173750h0cf54cd
Chart cluster-manager
Version 0.39.10-r27740a5ft20261130173750h0cf54cd
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/cluster-manager:0.39.10-r27740a5ft20261130173750h0cf54cd
Digest sha256:76f74399131842dd1fa9a8877d7bbd69897130a0f2422f7e7dbef8a4757a07e0
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/cluster-manager --version 0.39.10-r27740a5ft20261130173750h0cf54cd

Posted by architect-orb · build 5677 · commit 0cf54cd · updated in place on every push

@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record

Part of giantswarm/giantswarm#38902 (tool approval, milestone 1). Purpose: this record says what was reviewed on this branch (the chart's per-tool approval defaults for its MCPServer registered with muster: muster.mcpServer.approval), by whom and with which outcome, so that reviewers can skip what is covered. Branch tool-approval is 5 commits on 269ef00, tip b561e13. Hashes are those of the pushed tool-approval branch.

Read this first

  • One independent chart review of this repository and an independent re-check of the fix round. 2 findings here, all closed; the re-check verified all.
  • The Allow-on-write findings are closed by the governed mode in the agent-platform chart (safe lists, floors in muster), not by changing this chart's defaults: on trusted the defaults stay Allow, by design.
  • The last docs-only commit (b561e13, a comment linking the concept page as optional further reading) was read in a delta review of the component charts (Sonnet): no finding. Not run by anyone: helm unittest, helm-docs (README row checked by presence), a cluster: how an API server treats a field an old CRD lacks was reasoned, not observed.

Review rounds

# Round Scope Reviewer Kind Result
1 Chart review 269ef00..317d3eb (1 commit: 317d3eb) Claude Sonnet, independent of the implementer, implementer's notes not read code 2 findings
2 Fix round 5edaf2a, 805fe8f, 652a692 implementer fix findings closed, plus the Block rule (rule: Block accepted by schema and template)
3 Re-check of the fix round tool-approval clean tree, commits as listed; helm lint, helm template (default, rule=Block, rule=Deny, approval=null); drift test run Claude Sonnet 5.5, independent re-check all verified
4 Lab retest the chart-drift Go test; no cluster rendering of this chart tester lab pass
5 OSS-neutrality audit added lines read-only audit audit 1 docs finding (a vendor docs link in a values comment); fixed in b561e13
6 Delta review, charts and portal after the earlier re-check: b561e13; all added lines read Claude Sonnet 5.5, independent code no finding

What was checked

Check Result
Names in the map versus the tools registered (git grep over the Go source and the schema) identical sets (11 of 11); no missing, stale or mistyped name
Default render has the map rule: Allow and every tool Allow (11 tools)
approval: null none rendered
approval: {} in a values file defaults stay (documented: null, not {}, clears)
Invalid values (rule=Deny, tools.bogus=maybe, approval.extra=1) rejected by the schema, naming the path. The templates do not validate; the CRD's CEL refuses an invalid value that skips the schema
rule: Block renders (schema and template accept it)
helm lint, YAML validity of the default render ok
Conventions conventional commits, no !, no attribution; CHANGELOG.md and the chart version untouched; README row present

The schema carries a per-tool enum: a new tool must be added to the schema and the values together.

Findings

ID Severity Title Outcome Re-check
M1-cluster-manager-01 minor cluster and GPU pool creation and all destructive tools are Allow for agents obsolete: governed asks for the create and destructive tools (the safe list has four reads); trusted stays Allow verified
M1-cluster-manager-02 nit no drift test fixed in 652a692 (Go test) verified; test passes

Drift test: 652a692 compares the chart's map with the tools the server registers. Run result: pass on macOS in the re-check and in the lab retest.

Lab verification

This chart was not rendered in the agentlab runs: they used the released component charts (agent-manager is the exception, see its record). Rendering, schema and the per-tool map are covered by the checks above. The governed behaviour for this server (safe list, floors) is a property of the platform chart and muster, which were exercised in the lab; this server itself did not run there.

Open items

Findings still open or partly fixed: none; every finding of this repository is closed. Remaining notes:

Item What remains Why it is acceptable now
Old CRD A chart applied before muster's CRD upgrade needs a forced reconcile (flux reconcile helmrelease --force) Documented in the README and the platform chart's UPGRADE.md; muster refuses all server tools while the CRD lacks the field
Trusted mode Allow all stays the default on trusted By design; owner decision

Never run:

  • helm unittest locally (the chart tests were reproduced with helm template) and helm-docs (the README row was checked by presence).
  • A cluster: how an API server treats a field an old CRD lacks was reasoned, not observed; the chart was not rendered in any agentlab run, so its defaults were never exercised there.
  • A real Slack, a browser, a remote-target cluster and Flux remediation: not applicable to this chart.

@QuentinBisson

Copy link
Copy Markdown
Contributor

Review supplement for giantswarm/giantswarm#38902

Reviewed head: d293ac3ae99d7dd7dca874ad1c76029143fe0949 (rechecked unchanged). Compared the epic, linked PRD and subsequent design decisions with the implementation and existing local review record. Focus: MCPServer approval defaults, template, values schema/documentation and regression assertions. This supplements those reviews; it does not claim to rerun their tests or independently verify every generated fixture/test assertion.

Spec

The platform-management connector intentionally ships explicit Allow entries plus an Allow fallback. Governed safe lists and built-in muster floors remain additional restrictions; destructive Allow entries alone are not a spec violation. Install only after muster's CRD supports spec.approval.

This is a scoped contract assessment, not an exhaustive numbered acceptance score. Independent focused specification cross-checks covered the core enforcement/client contracts and platform/manager integration. Declared follow-ups and accepted design changes are not counted as new defects.

Blocking

No new blocking code finding established in this pass.

Non-blocking

None newly established.

Suggestions

None beyond the existing review follow-ups.

Deep verification

Aspect Status Evidence / limit
Problem confirmed on base n/a: feature slice The diff introduces the approval-related contract reviewed here; no claim of a locally reproduced base failure.
Fix addresses named root cause covers inspected scope Relevant changed paths traced against the scoped requirement.
Spec criteria met qualitative; no exhaustive score See Spec above.
Tests pin the contract static evidence Default/override/removal and enum regression assertions inspected; no local render or test execution.
Correct (edge cases) no additional defect established Inspected changed contracts and cross-repository dependencies; not a proof of all interleavings.
Standard mechanism existing patterns used MCPServer spec.approval, Helm toYaml/values schema and PRD Allow/Ask/Block terms.
Standard names sourced MCP/Kubernetes identifiers and PRD terminology; no new naming finding.
Security boundaries static review only Policy is enforced by muster, not annotations; chart changes add no workload privilege.
Simplest fix retain approach Small declarative chart change; no alternate implementation needed.
Reuse check no new duplication finding Existing surrounding helpers/patterns inspected within the stated scope.
CI checks green reported checks / skips See CI note below.
Pipeline gates unverified locally PR code execution prohibited in this session.
Findings 0 blocking / 0 non-blocking / 0 suggestions Findings above supplement the existing review record.
Merge danger two-way door this connector's default tool policy.

Reported checks passed or were skipped; no failed/cancelled check to triage. A skipped job is not evidence that its gate ran.

Unverified locally: applicable builds, tests (including race/integration/envtest), vet, formatting/lint/pre-commit, generators, Makefile verification targets, Helm rendering/schema/unit checks, and browser/live-cluster flows. No PR code was executed. GitHub-reported CI provides supporting evidence, not a local reproduction.

Recommendation: merge as-is within this review's scope, subject to existing release-order/rollout prerequisites and previously documented open items.

Team context: none.

@Rotfuks
Rotfuks marked this pull request as ready for review November 30, 2026 08:36
@Rotfuks
Rotfuks requested a review from a team as a code owner November 30, 2026 08:36
@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — merge of main before release

Merge a598320 of origin/main (6 commits, 5a1f8a5 among them) into tool-approval checked by Claude Fable 5.2, read-only: no finding. No hand resolution (git show --cc is empty). go build, go vet and go test -count=1 ./... pass (10 packages, TestChartApprovalMapNamesTheRegisteredTools among them). The helm-unittest suites were not run: the plugin failed to install on the review machine; the renders below were checked with helm template instead.

  • Approval block: unchanged by main and rendered before auth. Default: rule: Allow and the 11 tools written out. An override (delete_cluster: Ask, rule: Ask) renders; approval: null renders no block; an invalid setting fails the schema.
  • Audiences (5a1f8a5): requiredAudiences now comes from cluster-manager.requiredAudiences: the chart's own muster.mcpServer.auth.requiredAudiences, else global.identity.kubernetes.audiences, else no key. All three render as expected with OAuth on, with and without the approval block; without OAuth there is no auth block.
  • Schema: valid JSON. The approval subtree equals the branch's, the auth subtree equals main's, and the merged schema without approval equals main's schema, so nothing was lost or doubled. mcpServer stays additionalProperties: false.

@Rotfuks
Rotfuks merged commit a3d8e20 into main Nov 30, 2026
16 checks passed
@Rotfuks
Rotfuks deleted the tool-approval branch November 30, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants